// 定义用户管理相关的接口及表单数据类型
import type { IPageData, ResponseData } from '@/types/common'

// 用户筛选条件携带的参数类型
export interface IUserQueryData extends IPageData {
  username: string
  name: string
}

// 单个账号信息类型
export interface IUserData {
  id: number
  createTime: string
  name: string
  password: string
  phone: string | null
  roleName: string
  updateTime: string
  username: string
}

// 包含用户信息的数组
export interface IUserListResponseData extends ResponseData {
  data: {
    records: IUserData[]
    countId: string | number | null
    current: number
    hitCount: boolean
    maxLimit: string | number | null
    optimizeCountSql: boolean
    pages: number
    searchCount: boolean
    size: number
    total: number
  }
}

// 用户表单数据
export interface IUserFormData {
  id?: number
  username: string
  name: string
  password: string
}
